package com.qiandw.enterprise.credit.service

import com.qiandw.enterprise.credit.entity.BackstageUser
import com.qiandw.enterprise.credit.mapper.BackstageUserMapper
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Service

/**
  * Created by Draven on 2018/7/13.
  * Email:hjx@qiandw.com
  */
@Service
class BackstageUserSrvImp extends BackstageUserSrv {

  @Autowired
  var backstageUserMapper: BackstageUserMapper = _

  override def getBackstageUserByUsernameAndPassword(username: String, password: String): BackstageUser = {
      val user = backstageUserMapper.selectByUsernameAndPassword(username,password)
      user
  }

  override def updateBackstageUser(backstageUser: BackstageUser): Int = {
    val result = backstageUserMapper.updateByPrimaryKeySelective(backstageUser)
    result
  }
}
